From: Kenichi Handa Date: Mon, 2 Feb 2004 12:06:47 +0000 (+0000) Subject: (coding_restore_composition): Check invalid X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~24301 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=8ccd899ef3b707ee7ed833fb03524150f7000998;p=emacs.git (coding_restore_composition): Check invalid composition data more rigidly. --- diff --git a/src/coding.c b/src/coding.c index d9620b90722..7880e439e9d 100644 --- a/src/coding.c +++ b/src/coding.c @@ -5458,6 +5458,9 @@ coding_restore_composition (coding, obj) if (method == COMPOSITION_WITH_RULE_ALTCHARS && len % 2 == 0) len --; + if (len < 1) + /* Invalid composition data. */ + break; for (j = 0; j < len; j++) args[j] = make_number (data[4 + j]); components = (method == COMPOSITION_WITH_ALTCHARS